package com.guigu.lqxm.lq.controller;

import com.guigu.lqxm.lq.service.TestService;
import com.guigu.lqxm.lq.service.impl.TestServiceImpl;
import com.guigu.lqxm.pojo.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/shou")
public class LuoController {
    @Autowired(required = false)
    TestServiceImpl ts2;
    @GetMapping
    @ResponseBody
    public List<Test> selectall(){
        List<Test> tests = ts2.selectAll();
        return tests;
    }
}
